package cn.itcast.bos.dao.base;

import cn.itcast.bos.domain.base.TakeTime;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface TakeTimeRepository extends JpaRepository<TakeTime,Integer>,JpaSpecificationExecutor<TakeTime> {

    //作废
    @Query(value = "update TakeTime set status = '2' where id = ? ")
    @Modifying
    void updateStatus(Integer id);

    @Query(value = "update TakeTime set status = '1' where id = ? ")
    @Modifying
    void restoreBatch(Integer id);
}
